
use anyhow::Result;

pub async fn handle_string() -> Result<()> {
    let input = "31274
31346
31380
31622
32138
32184
32873
32888
35601
35712
35765
35863
35911
36107
36543
37281
37426
37443
37457
37492
37501
37513
37514
37521
37525
37556
37559
37563
37567
37572
37577
37579
37581
37588
37603
37631
37638
37650
37658
37666
37674
37675
37681
37683
37700
37714
37721
37723
37728
37731
37732
37734
37735
37746
37750
37752
37754
37768
37769
37770
37771
37785
37793
37794
37803
37810
37812
37815
37817
37820
37823
37824
37825
37827
37831
37834
37835
37836
37838
37839
37840
37852
37859
37870
37872
37878
37881
37884
37886
37891
37906
37907
37909
37926
37927
37933
37936
37938
37939
37940
37963
37967
37968
37974
37975
37976
37977
37979
37980
37982
37983
37984
37985
37987
37993
37994
38006
38007
38009
38010
38021
38022
38026
38028
38029
38034
38037
38038
38039
38040
38041
38045
38046
38048
38073
38081
38082
38087
38096
38097
38120
38147
38176
38213
38214
38253
38255
38260
38264
38265
38267
38269
38271
38272
38275
38376
38383
38386
38453
38464
38482
38490
38520
38538
38561
38575";
    let mut out = String::new();
    for line in input.lines() {
        // println!("ln -s /opt/local_ssd/addpiece_cache_64g/sector_cache.dat /opt/hdd_pool/.lotusworker/unsealed/s-t0808701-{}", line.trim());
        let line = line.trim();
        // log::info!("update sector set sector_stage = 'remove' where sector_number = {};", line);
        // log::info!("update seal_task set complete_time = sysdate(), task_status = 3 where sector_number = {} and task_status < 2;", line);

        // log::info!("insert into seal_task (task_id, task_type, sector_number, miner_actor, worker_id, assign_time, receive_time, complete_time, task_status)  values (uuid(), 'AP', {}, 808701, '06ff7f83-6544-482c-a133-124a384594ba', sysdate(), sysdate(), sysdate(), 2)", line);
        // log::info!("ln -s /opt/local_ssd/addpiece_cache_64g/sector_cache.dat /opt/hdd_pool/.lotusworker/unsealed/s-t0808701-{}", line)
        // log::info!("update sector set worker_id = '06ff7f83-6544-482c-a133-124a384594ba' where sector_number = {};", line);
        // log::info!("lotus-miner sectors remove --really-do-it {}", line);

        // println!("lotus-miner sectors terminate --really-do-it {}", line);

        // log::info!("update sector set sector_stage = 'remove' where sector_number = {};", line);

        println!("update sector set sector_stage = 'remove' where sector_number = {} and sector_stage <> 'GET';", line);
        // println!("insert into seal_task (task_id, task_type, sector_number, miner_actor, worker_id, assign_time, receive_time, complete_time, task_status) values (uuid(), 'PC2', {}, 808701, 'd27d32ee-6ae2-4dc6-bac4-58910c0ca28a', sysdate(), sysdate(), sysdate(), 3);", line);
        // println!("insert into sector (sector_number, miner_actor, sector_stage, sector_status, worker_id, update_time) values ({}, 808701, 'PC2', 1, 'd27d32ee-6ae2-4dc6-bac4-58910c0ca28a', sysdate());", line);
        // println!("update seal_task set worker_id = 'd27d32ee-6ae2-4dc6-bac4-58910c0ca28a' where sector_number = {} and task_type = 'PC2';", line);

        // out.push_str(line);
        // out.push_str(", ");
    }
    log::info!("{}", out);
    Ok(())
}